package com.jy.wms.dao;

import com.jy.wms.common.base.BaseDao;
import com.jy.wms.pojo.InstockDetailedReport;
import com.jy.wms.pojo.WmsOwnerOrdertype;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * Created by syh on 2018/4/11.
 */
public interface WmsInstockDetailedReportMapper extends BaseDao<InstockDetailedReport> {
    /**
     * 分页查询
     * @param entity 实体
     * @return
     */
    public List<InstockDetailedReport> baseSelectPage(@Param("InstockDetailedReport") InstockDetailedReport entity);

    /**
     * 查入库类型
     * @param hzid
     * @param ckid
     * @return
     */
    public List<WmsOwnerOrdertype> selectType(@Param("hzid") String hzid, @Param("ckid") String ckid);

    /**
     * 查期初库存getQckc是上架数量
     * @param instockDetailedReport
     * @return
     */
    public Integer getQckc(@Param("InstockDetailedReport") InstockDetailedReport instockDetailedReport, @Param("cjsj_start") String cjsj_start);

    /**
     * 查期初库存getQckc1是拣货数量
     * @param instockDetailedReport
     * @param cjsj_start
     * @param hzid
     * @param ckid
     * @return
     */
    public Integer getQckc1(@Param("InstockDetailedReport") InstockDetailedReport instockDetailedReport, @Param("cjsj_start") String cjsj_start,
                            @Param("hzid") String hzid, @Param("ckid") String ckid);

    /**
     * 查期末库存getQmkc是上架数量
     * @param instockDetailedReport
     * @return
     */
    public Integer getQmkc(@Param("InstockDetailedReport") InstockDetailedReport instockDetailedReport, @Param("cjsj_end") String cjsj_end);

    /**
     * 查期末库存 getQmkc1是拣货数量
     * @param instockDetailedReport
     * @param cjsj_end
     * @param hzid
     * @param ckid
     * @return
     */
    public Integer getQmkc1(@Param("InstockDetailedReport") InstockDetailedReport instockDetailedReport, @Param("cjsj_end") String cjsj_end,
                            @Param("hzid") String hzid, @Param("ckid") String ckid);

    /**
     * 查入库汇总
     * @param instockDetailedReport
     * @return
     */
    public String getRkhz(@Param("InstockDetailedReport") InstockDetailedReport instockDetailedReport,
                          @Param("cjsj_start") String cjsj_start, @Param("cjsj_end") String cjsj_end,
                          @Param("hzid") String hzid, @Param("ckid") String ckid);

    /**
     * 用货品编号 查订单类型
     * @param cpbh
     * @param hzid
     * @param ckid
     * @return
     */
    public List<Map<String, Object>> selectDdlx(@Param("cpbh") String cpbh, @Param("hzid") String hzid, @Param("ckid") String ckid, @Param("cjsj_start") String cjsj_start, @Param("cjsj_end") String cjsj_end);

    /**
     * 导出查询
     * @param map
     * @return
     */
    public List<Map<String,Object>> getInstockExport(Map<String, Object> map);
}
